﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using webapp4U.BOL;

namespace webapp4U.UI
{
    public partial class Logon : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void btSubmit_Click(object sender, EventArgs e)
        {
            // khi khach hang tu choi khong nhan thu lien he
            string Email = txtEmail.Text;

            // neu nam trong danh sach newsletter thi xoa luon
            // vi khong anh huong dan he thong
            webapp4U.BOL.NewsLetter.DeleteByEmail(Email);

            // neu la Employer hay JobSeekers thi chi set thuoc tinh
            webapp4U.BOL.User.UpdateNewsLetter(Email, false);

            lblMsg.Text = "Địa chỉ Email của bạn đã được bỏ khỏi danh sách nhận NewsLetter.";

        }
    }
}